// 来自 @Nwflower
import fs from "node:fs"
import {_path, configPath, defaultPath} from "./path.js";

class init {

    config() {
        let defaultConfigList = fs.readdirSync(defaultPath).filter(file => file.endsWith(".yaml"));
        for (let fileName of defaultConfigList) {
            if (!fs.existsSync(`${configPath}${fileName}`)) {
                fs.copyFileSync(`${defaultPath}${fileName}`, `${configPath}${fileName}`)
            }
        }
    }

}

export default new init()
